import React from "react"

// 获取定时任务列表
export async function apiGetTimedTaskPage(params) {
    return await React.$post('/trade/couponTimerCenter/page',params)
}

// 查询定时任务结果
export async function apiPostTimedTaskResult(params) {
    return await React.$post('/trade/couponTimerStatus/page',params)
}

// 获取优惠券列表
export async function apiGetCouponList(params) {
    return await React.$post('/trade/couponTimerStatus/page',params)
}

// 删除未开始任务
export async function apiGetCouponTimerCenterDel(params) {
    return await React.$get('/trade/couponTimerCenter/delete',params)
}
// 创建任务
export async function apiPostCouponTimerAdd(params) {
    return await React.$postJson('/trade/couponTimerCenter/add/Json',params)
}

// 修改定时任务
export async function apiPostCouponTimerModify(params) {
    return await React.$postJson('/trade/couponTimerCenter/modify/Json',params)
}

// 查询定时任务关联优惠券
export async function apiPostTimerCouponPage(params) {
    return await React.$post('/trade/timerCoupon/page',params)
}

// 查询定时任务关联用户
export async function apiPostTimerUserPage(params) {
    return await React.$post('/trade/timerUser/page',params)
}

// 优惠券列表
export async function apiAppCouponInfoPage(params) {
    return await React.$post('/trade/couponInfo/page', params);
}
// 优惠券新建
export async function apiAppCouponInfoAdd(params) {
    return await React.$postJson('/trade/couponInfo/addCoupon/Json', params);
}
// 优惠券改
export async function apiAppCouponInfoEdit(params) {
    return await React.$postJson('/trade/couponInfo/editCount/Json', params);
}
// 提前结束
export async function apiAppCouponInfoEnd(params) {
    return await React.$get('/trade/couponInfo/endCoupon', params);
}
// 详情
export async function apiGetCouponByIdListView(params) {
    return await React.$get(`/trade/couponInfo/couponByIdList/${params}`);
}
// 指定发放 优惠券
export async function apiGetByCouponCentre(params) {
    return await React.$postJson('/trade/couponInfo/getByCouponCentre/Json', params);
}
// 获取门店ID
export async function apiGetStoreId(params) {
  return await React.$get('/market/api/b/lotteryDrawTurntable/getStoreId', params);
}